﻿@{
    Layout = "_Layout_pop_scroll";
}
@section scripts{
    <script type="text/javascript">
        var acceptClick;
        var UserId = request('UserId');
        var bootstrap = function ($, ibpm) {
            "use strict";
            var page = {
                init: function () {
                    page.bind();
                },
                bind: function () {
                    //绑定多选表格
                    $('#gridtable').jfGrid({
                        url: top.$.rootUrl + '/Org/OrgUser/GetPostCheck?id=' + UserId,
                        headData: [
                            { label: "岗位名称", name: "FullName", width: 200, align: "center" }
                        ],
                        mainId: 'PositionId',
                        isPage: false,
                        isMultiselect: true,
                        multiselectfield: 'Sort',
                        rows: 9900
                    }).jfGridSet('reload');
                }
            };
            acceptClick = function (callBack) {
                var selectedRole = $('#gridtable').jfGridGet('rowdata');
                var Line = "";
                selectedRole.forEach(function (element) {
                    Line += element.PositionId + ",";
                });
                Line = Line.replace(/(^,)|(,$)/g, '');
                if (!!callBack) {
                    callBack(Line);
                }
                return true;
            };
            page.init();
        }
    </script>
}

<div class="row" style="margin: 5px;">
    <div class="step-pane">
        <div id="gridtable"></div>
    </div>
</div>